<template>
<div>
  <span style="font-size: 40px;color: red">下载中心</span>
  <div >
    <el-button type="success" style="height: 40px;margin-top: 10px;margin-left: 30px" plain @click="downloads">下载1</el-button>  <br>
  </div>

</div>
</template>

<script>
export default {
      methods:{
           async downloads(){
             this.$confirm('确定下载该文件吗?', '提示', {
               confirmButtonText: '确定',
               cancelButtonText: '取消',
               type: 'warning'
             }, ).then(async () => {
               let res = await this.$http.get('');
               if (res.data.code == 200) {
                 this.$message.success(res.data.message);
               } else {
                 this.$message.error(res.data.message);
               }
             }).catch(() => {
               this.$message({
                 type: 'info',
                 message: '已取消下载'
               });
             });
           }
      }
}
</script>

<style scoped>

</style>